static-lib=libmymath.a

.PHONY:all
all: $(static-lib)

$(static-lib):add.o
	ar -rc $@ $^
add.o:add.c
	gcc -c $^

.PHONY:clean
clean:
	rm -rf *.o *.a  mylib

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.h mylib/include
	cp *.a mylib/lib
